# -*- coding:utf-8 -*-
# @File       :   x的平方根2.py
# @Author     :   LINING
# @Time       :   2024/3/5 16:47
# @Description :  实数二分，精确到小数点后2位


def get_num(target):
    left = 1
    right = target
    while right - left > 0.1:
        mid = (left+right)/2
        if mid * mid > target:
            right = mid
        else:
            left = mid
    return left


print(get_num(4))

